home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / Newton Platform Info / Newton 2.0 Sample Code / Desktop Connectivity / SoupDrink-2 / SoupDrink-Windows-1 / README.TXT < prev    next >
Encoding:
Text File  |  1996-01-15  |  2.5 KB  |  53 lines  |  [TEXT/R*ch]

  1. /*
  2. **      Newton Developer Technical Support Sample Code
  3. **
  4. **      SoupDrink, code to demonstrate use of the CDILs and FDILs
  5. **
  6. **      by David Fedor, Rob Langhorne and Christopher Bell
  7. **
  8. **      Copyright © 1995-1996 by Apple Computer, Inc.  All rights reserved.
  9. **
  10. **      You may incorporate this sample code into your applications without
  11. **      restriction.  This sample code has been provided "AS IS" and the
  12. **      responsibility for its operation is 100% yours.  You are not
  13. **      permitted to modify and redistribute the source as "DTS Sample Code."
  14. **      If you are going to re-distribute the source, we require that you
  15. **      make it clear in the source that the code was descended from
  16. **      Apple-provided sample code, but that you've made changes.
  17. */
  18.  
  19.  
  20. This is a complete Windows application which demonstrates use of the CDILs
  21. and the FDILs.  It is designed to communicate with the Newton SoupDrink
  22. package (soupdrnk.pkg), which is also in this archive.
  23.  
  24. Most of the interesting DIL code can be found in the file Engine.c, which
  25. holds the cross-platform code which makes most of the DIL API calls.
  26.  
  27. The SoupDrink application has two test scripts.  The first, "Read Soup",
  28. will read the entire contents of any soup on the Newton device.  It does
  29. this by sending a command to the Newton device indicating the name of the
  30. soup to read, and then repeatedly reading frames which are sent from the
  31. Newton application, converting them to text, and writing them to the file
  32. SoupData.out.
  33.  
  34. The second test script, "New Name", constructs a name card frame for the
  35. built-in Names application, and sends it to the Newton device.  The Newton
  36. SoupDrink application adds it to the Names soup.
  37.  
  38.  
  39. Note that the SoupDrink application always uses COM1.  You should provide
  40. an interface for the user to select which port is to be used.  If you are
  41. sending large binary objects, or are experiencing transmission problems,
  42. it may be necessary to lower the baud rate to 9600 baud.
  43.  
  44. Also note that there are two makefiles; one for Windows 3.1 (SOUP16.MAK)
  45. and one for 32-bit versions of Windows (SOUPDRNK.MAK).  Both versions
  46. should work under Windows 95.
  47.  
  48. There is only one difference between Windows code and MacOS code: after
  49. calling CDPipeListen, you must wait for a short period to let the pipe
  50. state change to kCDIL_ConnectPending.  There is an example of how to
  51. perform this loop in engine.c.  It is #ifdef'd such that it will not
  52. execute on a Macintosh, but it will not cause harm if it does run.
  53.